# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Stefan Tatschner <stefan@rumpelsepp.org>
# Contributor: Sven Schneider <archlinux.sandmann@googlemail.com>

pkgname=python-aenum
pkgver=3.1.11
pkgrel=5
pkgdesc='Advanced Enumerations for Python'
arch=(any)
url=https://github.com/ethanfurman/aenum
license=(BSD)
depends=(python)
makedepends=(
  git
  python-setuptools
)
_tag=22585c38409cc02d4dc19aa75c7f2c9482fdb47c
source=(git+https://github.com/ethanfurman/aenum.git#tag=${_tag})
b2sums=(SKIP)

prepare() {
  rm -f aenum/aenum/{_py2,test,test_v3}.py
}

build() {
  cd aenum
  python setup.py build
}

package() {
  cd aenum
  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -dm 755 "${pkgdir}"/usr/share/{doc,licenses/python-aenum}
  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
  mv "${pkgdir}"${site_packages}/aenum/doc "${pkgdir}"/usr/share/doc/python-aenum
  mv "${pkgdir}"${site_packages}/aenum/CHANGES "${pkgdir}"/usr/share/doc/python-aenum/
  mv "${pkgdir}"${site_packages}/aenum/LICENSE "${pkgdir}"/usr/share/licenses/python-aenum/
}

# vim: ts=2 sw=2 et:
